*Note: This code estimates the models reported in Table A.18 of the Supplemental Appendix.
*	To do so, it reads-in the Stata .dta file "MainMalariaDataset.dta" and then prints relevant table output to screen.

*clear Stata
clear
clear matrix

*set memory
set more 1
set matsize 400
set mem 500m

*set working directory
cd  ""

*start log file
log using "Table_A18", replace

*read-in directed-dyadic dataset
use "MainMalariaDataset.dta"

******************************************************
******************Table A.18 Results******************
******************************************************

*Pooled model
logit dr_1_at_2_m malaria_2m_obsonly Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

*Pooled (clustered se's) model
logit dr_1_at_2_m malaria_2m_obsonly Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m  t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m malaria_2m_obsonly Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m malaria_2m_obsonly Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) 

*close log file
log close
